import React, { Component } from 'react'
import { NavLink } from 'react-router-dom'
import { TabBar } from 'antd-mobile';
import { connect } from 'react-redux';
export class MyFooter extends Component {

  constructor(props) {
    super(props);
    this.state = {
      selectedTab: 'home',
    };
  }

  render() {
    let { allNum } = this.props;
    console.log('props', this.props);
    return (

      <footer className="myFooter" id="tab-bar">



        <NavLink to="/home">首页</NavLink>
        <NavLink to="/list">商品</NavLink>
        <NavLink to="/cart"><span>{allNum}</span>购物车</NavLink>

        <NavLink to="/my">我的</NavLink>
      </footer>

    )
  }
}

const mapStateToProps = (state) => {
  return {
    ...state
  }
}

export default connect(mapStateToProps)(MyFooter)